package com.Hermes.Proxy;

import com.Hermes.Omega.Omega;
import com.Hermes.Omega.PK;
import it.unisa.dia.gas.jpbc.Element;

import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;

public class CT {
    private static PK pk;
    private static Omega omega;
    private static BigInteger sk;

    public static int  CT_CMP(Element EleR,Element R) throws NoSuchAlgorithmException {
        BigInteger eler = omega.Dec(EleR.getImmutable(), sk);
        BigInteger r=omega.Dec(R.getImmutable(), sk);
        return eler.compareTo(r);
    }

    public void setup(Omega _o, PK _pk,BigInteger sk){
            omega=_o;
            pk=_pk;
            CT.sk =sk;
    }
}
